package com.tianhui.consignortwofei.other.auth.recognition.recognitionResultProcess;

import com.fgs.common.utils.DateUtil;
import com.fgs.common.utils.StringUtil;
import com.tianhui.consignortwofei.mvp.model.enty.ocrResult.roadTransport.RoadTransportInfo;
import com.tianhui.consignortwofei.mvp.model.enty.ocrResult.roadTransport.RoadTransportResult;

/**
 * @author fgs
 * @date 2021/1/10
 * @description
 **/
public class VehicleRoadOcrResultProcess {
    public RoadTransportInfo getVehicleRoadInfo(RoadTransportResult resultInfo) {

        if (resultInfo == null) {
            return new RoadTransportInfo();
        }
        RoadTransportInfo info = resultInfo.result;
        if (info != null) {
            //道路运输证号
            info.license_number = StringUtil.extractDigital(info.license_number);
            //发证日期
            info.issue_date = DateUtil.validDateFormat(info.issue_date, "yyyy-MM-dd");

        }
        return info;

    }
}
